feat(issues): Implement EAP group search for issue feed queries#112985
Conversation
…t-generic-over-trace-item-type' into shashjar/issue-feed-search-eap-parse-search-filters-into-query-string
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 50f0c86. Configure here.
Comment on lines
+177
to
+178
| if " " in s or '"' in s or "," in s or "(" in s or ")" in s: | ||
| escaped = s.replace("\\", "\\\\").replace('"', '\\"') |
Contributor
There was a problem hiding this comment.
Bug: The _format_string_value function doesn't quote strings containing square brackets [ or ], which are special characters in EAP query syntax and may cause parsing errors.
Severity: MEDIUM
Suggested Fix
Update the conditional check in the _format_string_value function to include square brackets. Add checks for "[" in s and "]" in s to the if statement on line 177 to ensure strings containing these characters are properly quoted.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: src/sentry/search/eap/occurrences/search_executor.py#L177-L178
Potential issue: The `_format_string_value` function checks for special characters to
determine if a string value needs quoting, but it does not include square brackets (`[`
and `]`). Since square brackets are used for list syntax in EAP queries, a field value
containing them (e.g., `config[production]`) will not be quoted. This can cause the EAP
parser to misinterpret the literal string value as list syntax, potentially leading to
incorrect query behavior or parsing errors. The function already handles other
syntactically significant characters like parentheses and commas, suggesting the
omission of brackets is an oversight.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

PR 1/2 to implement issue feed search via EAP queries. Precursor to #112996.
search_filters_to_query_string()to convert legacy SnubaSearchFilterobjects into EAP-compatible query stringsrun_eap_group_search()which provides issue feed search capability via EAP